Repository navigation
Conversation
…tives Add low-level `no_std` filesystem, I/O, and allocator-backed path resolution primitives needed by the freestanding Linux ELF/SIGSYS tracker and shared Unix exec resolver: - `fspy_nostd`: `Error::ACCES`, `pread`, `faccessat`, `stat`/`fstat`, `getcwd`, `readlinkat`/`fcntl_getpath`, plus unit tests. - `fspy_nostd_alloc`: allocator-backed `getcwd`, `fd_path`, `resolve_path_at`, and pooled bump allocator helpers, plus unit tests. - `vt_ipc_str`: `IpcStr::as_bytes` for Unix and `target_os = "none"`. - `fspy_shared`: gate host dev-dependencies on `not(target_os = "none")`. Co-authored-by: Gemini 4 Neon <noreply@google.com>
fspy benchmarklinuxmacoswindows |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6730e4b. Configure here.
Co-authored-by: Gemini 4 Neon <noreply@google.com>
…r decoding
- Wrap `PageBump` like `PooledBump` with unconditional `#[inline(never)]` on
`allocate`/`deallocate`/`grow` and drop unused `allocate_zeroed`/
`grow_zeroed`/`shrink` overrides
- Avoid panicking on odd byte lengths in Windows `IpcStr::to_os_string`
- Export `fspy_nostd_alloc::fs::format_proc_self_fd` for reuse
- Use `linux_raw_sys::general::{PATH_MAX, X_OK}` instead of literals in
`fspy_nostd::fs::linux`
- Tighten `BorrowedFd::try_borrow_raw` to accept only `fd >= 0 || fd == CWD_RAW`
- Remove dead/unreachable code (`mac::getcwd_small`, `Error::NOSYS`,
`AtFlags::REMOVEDIR`, and unreachable `OVERFLOW` fd conversions in Linux fs)
Co-authored-by: Gemini 4 Neon <noreply@google.com>
Co-authored-by: Gemini 4 Neon <noreply@google.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Replacing Linux
LD_PRELOADandseccomp_unotifywith an in-process freestanding (target_os = "none") ELF/SIGSYSlauncher requiresno_stdUnix filesystem, I/O, and allocator-backed path-resolution primitives shared between the freestanding Linux launcher and the macOS preload library.Changes
fspy_nostd: addError::ACCES(plus.typos.toml),pread,faccessat,stat/fstat,getcwd,readlinkat/fcntl_getpath, andOwnedFd::from_raw_fd, with unit tests.fspy_nostd_alloc: add allocator-backedgetcwd,fd_path,resolve_path_at, andPooledBumphelpers, with unit tests.vt_ipc_str: exposeIpcStr::as_bytesfor Unix andtarget_os = "none".fspy_shared: gate host dev-dependencies onnot(target_os = "none")for bare-metal builds.Stack created with GitHub Stacks CLI • Give Feedback 💬
Note
Medium Risk
Touches low-level syscalls, fd borrowing semantics, and bump allocation in signal-sensitive contexts; behavior changes are covered by tests but warrant review on Linux and macOS.
Overview
Expands no_std Unix support for freestanding launchers and preload: new errno constants,
pread,faccessat, richerfstat(regular-file detection), Linuxfcntldup/CLOEXEC helpers, andBorrowedFd::try_borrow_rawnow acceptsAT_FDCWDas well as non-negative fds.fspy_nostd_allocaddsfd_path,resolve_path_at, and stackformat_proc_self_fdso relative paths can be joined against cwd or an open directory fd; macOSgetcwdnow requires at leastPATH_MAX.PageBump/PooledBumpwrapbump_scope::Bumpwith#[inline(never)]allocators to avoid blowing signal/vfork stack limits.Smaller fixes:
IpcStr::as_byteson Unix/none, safer Windowsto_os_stringfor odd-length payloads,fspy_shareddev-deps gated offtarget_os = "none", and broad unit tests (incl.tempfilein alloc tests).Reviewed by Cursor Bugbot for commit c0d04e8. Bugbot is set up for automated code reviews on this repo. Configure here.